Binary data manipulation is fundamental to all types of data processing. In many process control types of data processing systems, the data base of the system consists of many quanta of binary data. One example of such a system is a program controlled telephone switching system. In such a system these quanta of binary data range in size from a single bit to a size larger than a single memory word. Individual bits may represent, for example, the busy/idle states of lines or trunks or other system elements. A group of N bits may identify up to 2.sup.N peripheral units of a given type. Economic considerations preclude storing only a single quantum per memory location. All of the bits of the memory should be sufficiently utilized. Consequently, binary data manipulation of less than full data words is fundamental to telephone call processing.
The packing and unpacking of memory locations requires two basic operations: alignment and insertion. Alignment refers to the operation of moving a quantum of bits from one location in a data word to another location. This alignment is presently accomplished with shift and rotate instructions in most processors. The second operation, insertion, refers to placing a field of data from one data word into the same location within a second data word. This operation is usually accomplished with a mask which indicates with binary ones those bit positions of the first word which are to be inserted into the second word.
In order to accomplish alignment and insertion, existing processors use separate, rotate, shift, and insert under mask instructions in various combinations to perform the necessary data manipulation functions. Such combinations of individual instructions require substantial execution time of the processor and therefore are inefficient from a real time standpoint.
It is an object of our invention to utilize a single instruction to control an efficient data manipulation logic arrangement in the performance of shift, rotate, insert under mask operations in various combinations.